<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<META HTTP-EQUIV="pragma" CONTENT="no-cache">  
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">  
<META HTTP-EQUIV="expires" CONTENT="0">  
<title></title>
<link rel="stylesheet" type="text/css" href="css/hui.css" />
<style type="text/css">
	table tr td{ border-bottom:#E1E1E1 solid 1px;line-height:54px;}
	.ttt
	{
	border:1px solid;
	border-radius:5px;
	height: 30px;
	width: 82px;
	text-align: center;
	line-height:30px;
	-moz-border-radius:15px; /* Old Firefox */
	}
</style>
</head>
<body style="background:#F4F5F6;">
	<header class="hui-header">
    <h1>策略列表</h1>
</header>
<div class="hui-wrap">
  
                    <table style="width: 100%;height: 100%;border-collapse:separate; border-spacing:0px;">
						<tr style="margin-top: 20px;">
							<td width='40%' style="color: #929292;font-size: 12px;" align='left'>&nbsp;&nbsp;名称代码</td>
							<td width='16%' style="color: #929292;font-size: 12px;" align='center'>现价</td>
							<td width='16%' style="color: #929292;font-size: 12px;" align='center'>涨跌幅</td>
							<td width='28%' align='center'>
								
								<div class="ttt">编辑</div>
								
							</td>
						</tr>
						<tbody id="listZX">
							
						</tbody>
                    </table>
                    <br/> <br/> 
                    <div id="add" style="width: 100;text-align: center;" onclick="javascript:hui.open('zixuan.html');">
                    	<img src="image/add.png" /><br/> 
                    	添加自选
                    </div>
                    
       
</div>
<div id="hui-footer">
    <a href="javascript:hui.open('index.html');" id="nav-home">
        <div class="hui-footer-icons hui-icons-home"></div>
        <div class="hui-footer-text">首页</div>
    </a>
    <a href="javascript:hui.open('zixuan.html');" id="nav-news">
        <div class="hui-footer-icons hui-icons-picker"></div>
        <div class="hui-footer-text">选股</div>
    </a>
    <a id="nav-news">
        <div class="hui-footer-icons hui-icons-water-fall"></div>
        <div class="hui-footer-text">策略</div>
    </a>
    <a href="javascript:hui.open('msg.html');" id="nav-forum">
        <div class="hui-footer-icons hui-icons-forum"></div>
        <div class="hui-footer-text">消息</div>
    </a>
    <a href="javascript:hui.open('yonghu.html');" id="nav-my">
        <div class="hui-footer-icons hui-icons-my"></div>
        <div class="hui-footer-text">我的</div>
    </a>
</div>
<script src="js/hui.js" type="text/javascript"></script>
<script src="js/hui-tab.js" type="text/javascript"></script>
<script type="text/javascript">
	hui.tab('.hui-tab');
	hui.ready(function(){
		hui.loading('加载');
			var user = localStorage.getItem("nowUser");//取回students变量  
		user = JSON.parse(user);//把字符串转换成JSON对象 
			hui.post(
			    url_root+':8080/st/servlet/OptionalServlet',
			    {method:'getOptionalList', userId:user.id},
			    function(msg){
			    	if(msg=="none"){
			    		 hui.loading(false, true);
			    		return;
			    	}
			    	var obj = eval(msg);
			    	for(var i=0;i<obj.length;i++){
			    		var tr="<tr width='100%'><td width='40%'>&nbsp;&nbsp;####-%%%%</td><td align='center' width='16%'>wwww</td><td style='color:oooo;' width='16%' align='center'>eeee%</td><td width='28%' align='center'><div class='ttt' style='color:red;' >创建策略</div></td></tr>";
			    		tr= tr.replace("####",obj[i][0]);
			    		tr= tr.replace("%%%%",obj[i][1]);
			    		tr= tr.replace("wwww",obj[i][2]);
			    		var num = parseFloat(obj[i][3]);
			    		if(num>0){
			    			tr= tr.replace("oooo","red");
			    		}else{
			    			tr= tr.replace("oooo","green");
			    		}
			    		tr= tr.replace("eeee",num.toFixed(2));
			    		
			    		hui("#listZX").html(hui("#listZX").html()+tr);
			    		
			    	}
			    hui.loading(false, true);
			    },
			    function(e){
			        hui.iconToast('网络故障', 'warn');
			    }
			);
	});
</script>
</body>
</html>